package com.bite.forum.exception;

import com.bite.forum.common.AppResult;

public class ApplicationException extends RuntimeException{

    private AppResult errorResult;

    public ApplicationException(AppResult errorResult){
        super(errorResult.getMessage());
        this.errorResult = errorResult;
    }

    public ApplicationException(String message){
        super(message);
    }

    public ApplicationException(Throwable cause){
        super(cause);
    }

    public ApplicationException(String message , Throwable cause){
        super(message , cause);
    }

    public AppResult getErrorResult(){
        return errorResult;
    }

}
